package com.lanou3g.k12.service;

import com.github.pagehelper.Page;
import com.lanou3g.k12.entity.User;

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.io.InputStream;
import java.util.List;

public interface UserService {
    //用户注册
    void insertUser(User user) throws Exception;

    //通过ID删除用户
    void deleteUserById(Long id);

    //关键字查询
    Page search(Integer page, String keyword, Integer size);

    //获取用户列表
    Page findAllUser(Integer page,Integer size);

    //根据id批量导出数据
    InputStream exportByIds(Integer[] ids) throws IOException;

    // 通过ID获取用户
    List <User> findUserById(Long id);

    // 通过ID修改用户
    void updateUserById(Long id, User user);

    // 通过ID批量删除用户
    void deleteByIds(Integer[] ids);

    void updatePwd(User user);

    String login(String phone, String password) throws Exception;

    void quit(HttpServletRequest request);

    String perfectUser(User user);
}
